<template>
  <div class="home">
    <!-- <Card title="操作日志">
      <template v-slot:top>
        <el-button @click="refresh" type="refresh" plain style="padding:5px 5px 5px 5px">
          <i class="el-icon-refresh"></i>刷新
        </el-button>
     </template>
    </Card> -->
    <!-- 一级信息 -->
    <div class="main">
      <div class="tag">
        <div class="tag1">筛选查询</div>
        <el-button class="btn2" type="small">查询结果</el-button>
      </div>
      <div class="main-body1">
        <el-form
          class="body-form"
          :model="infoLevel1"
          label-width="120px"
          :inline="true"
        >
          <!-- :rules="rulesInfoLevel1" -->
          <el-form-item
            class="form-item btn4"
            prop="operator "
            label="操作人员:"
          >
            <el-select
              class="add-menu-level"
              v-model="infoLevel1.operator"
              placeholder="请选择"
            >
              <el-option
                v-for="item in operatorList"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item
            class="form-item btn4"
            prop="operator "
            label="操作日期:"
          >
            <el-date-picker
              v-model="valuedate"
              type="datetime"
              value-format="yyyy-MM-dd HH:mm:ss"
              placeholder="选择日期时间"
              @change="chooseTimeRange"
            >
            </el-date-picker>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <Card title="数据列表" >
      
      <template v-slot:bottom>
         <el-table
      :data="tableData"
      border
      style="width: 100%">
      <el-table-column
        prop="date"
        label="时间"
        align="center"
        >
      </el-table-column>
      <el-table-column
        prop="ip"
        label="IP"
        align="center"
        >
      </el-table-column>
      <el-table-column
        prop="address"
        label="地区"
        align="center"
        >
      </el-table-column>
      <el-table-column
        prop="browser"
        label="浏览器"
        align="center"
        >
      </el-table-column>
    </el-table>

   <div class="block">
    
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[10, 20, 30, 40,50,60,70,80]"
      :page-size="10"
      layout="total, sizes, prev, pager, next, jumper"
      :total="80"
      style="float:right;margin-top:10px">
    </el-pagination>
  </div>
      </template>
    </Card>
  </div>
</template>

<script>
import Card from "@/components/card/card";
export default {
    components: {
    Card,
  },
  data() {
    return {

    //   total:0,
      currentPage: 1,
      valuedate: '',
      operatorList: [
        {
          value: 1,
          label: "人员1",
        },
        {
          value: 2,
          label: "人员2",
        },
        {
          value: 3,
          label: "人员3",
        },
      ],


      message: "",
      infoLevel1: {
        operator: "", //操作人员
      },
     
      tableData: [{
            date: '2016-05-02',
            ip: '192.168',
            address: '上海市普陀区金沙江路 1518 弄',
            browser:'谷歌浏览器'
          }, {
            date: '2016-05-04',
            ip: '192.168',
            address: '上海市普陀区金沙江路 1517 弄',
            browser:'谷歌浏览器'
          }, {
            date: '2016-05-01',
            ip: '192.168',
            address: '上海市普陀区金沙江路 1519 弄',
            browser:'谷歌浏览器'
          }, {
            date: '2016-05-03',
            ip: '192.168',
            address: '上海市普陀区金沙江路 1516 弄',
            browser:'谷歌浏览器'
          }]
    };
  },
  
  methods: {
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      },
      chooseTimeRange(){
        console.log(this.valuedate)   
         }

  },
  methods:{
    refresh(){
      this.$router.go(0);
    }
  }
};
</script>

<style scoped>
.btn1 {
  margin-left: 69%;
  float: right;
}
.btn2 {
  margin-left: 30%;
  height: 40px;
  float: right;
  margin-right: 50px;
}
.btn3 {
  margin-right: 100px;
  float: right;
}
.btn4 {
  margin-left: 100px;
  float: left;
}

.btn5 {
  margin-top: 80px;
}

html,
body,
#app {
  height: 100%;
}

.tag1 {
  
  float: left;
}
.home {
  min-height: 100%;
  width: 100%;
  background-color: #eeeeee;
}

.title {
  text-align: left;
  border: solid 1px #e4e4e4;
  height: 55px;
  line-height: 20px;
  background-color: #f3f3f3;
  color: #999999;
  padding-top: 20px;
  padding-left: 20%;
  font-size: 13px;
}

.title p {
  height: 20px;
  margin: 0;
  padding-left: 5px;
  border-left: solid 3px #1abc9c;
}

.row {
  display: flex;
  flex-direction: row;
}

.main {
  margin-top: 20px;
  /* width: 1100px; */
  /* border: solid 1px #e4e4e4; */
  padding-top: 0;
  padding-bottom: 0px;
  /* margin-left: 20%; */
  height: 100%;
  text-align: center;
}
.main1 {
  margin-top: 0px;
  /* width: 1100px; */
  /* border: solid 1px #e4e4e4; */
  padding-top: 0;
  padding-bottom: 20px;
  /* margin-left: 20%; */
  height: 100%;
  text-align: center;
}

.main-title {
  height: 50px;
  text-align: left;
  padding-left: 20px;
  font-size: 13px;
  line-height: 50px;
}

.main-body1 {
  border: solid 1px #e4e4e4;
  min-height: 100px;
  background-color: #ffffff;
  padding-top: 10px;
  padding-left: 10px;
}
.main-body2 {
  border: solid 1px #e4e4e4;
  min-height: 250px;
  background-color: #ffffff;
  padding-top: 10px;
  padding-left: 10px;
}

.sub-btn {
  margin-left: 22%;
  background-color: #1abc9c;
  color: #ffffff;
  width: 80px;
  height: 38px;
}

.form-item {
  min-height: 50px;
  line-height: 50px;
}

.body-form {
  text-align: left;
}

.form-center {
  padding-left: 150px;
}

.body-form .el-select {
  width: 220px;
  margin-top: 10px;
}

.form-item .el-input {
  width: 220px;
  margin-top: 10px;
  border-radius: 0;
}

/* .address .el-input {
  width: 580px;
} */

.form-item .el-input__inner {
  border-radius: 0;
}

/* .form-img {
  width: 180px;
  height: 180px;
  margin-right: 42px;
  text-align: center;
  border: solid 1px #e4e4e4;
} */

/* .form-img .icon-add {
  margin-top: 50px;
} */
</style>